import 'package:cook_dinner/config/include.dart';
import 'package:cook_dinner/pages/verification/verification_view/verification_view.dart';
import 'package:cook_dinner/widgets/input.dart';
import 'package:flutter/material.dart';

class VerificationCode extends StatefulWidget {
  const VerificationCode({Key? key}) : super(key: key);

  @override
  State<VerificationCode> createState() => _VerificationCodeState();
}

class _VerificationCodeState extends State<VerificationCode> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      behavior: HitTestBehavior.translucent,
      onTap: () {
        FocusScope.of(context).unfocus();
      },
      child: Scaffold(
        resizeToAvoidBottomInset: true,
        body: Container(
          width: HYSizeFit.screenWidth,
          height: HYSizeFit.screenHeight,
          padding: EdgeInsets.only(top: 188.rpx),
          decoration: const BoxDecoration(
            color: Colors.white,
            // image: DecorationImage(
            //   image: AssetImage('assets/images/code.png'),
            //   fit: BoxFit.cover,
            // ),
          ),
          child: Column(
            children: [
              Text(
                '请输入验证码',
                style: TextStyle(
                  fontSize: 36.rpx,
                  color: const Color(0xff191632),
                ),
              ),
              SizedBox(height: 22.rpx),
              Text(
                '请出入您130xxxxxxxxx收到的手机验证码',
                style: TextStyle(
                  fontSize: 14.rpx,
                  color: const Color(0xffABAAB1),
                ),
              ),
              SizedBox(height: 69.rpx),
              Padding(
                padding: EdgeInsets.symmetric(horizontal: 53.rpx),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: const [
                    VerificationInput(),
                    VerificationInput(),
                    VerificationInput(),
                    VerificationInput(),
                  ],
                ),
              ),
              Padding(
                padding: EdgeInsets.only(right: 54.rpx, top: 26.rpx),
                child: Align(
                  alignment: Alignment.centerRight,
                  child: Text(
                    '40秒后重新发送',
                    style: TextStyle(
                      fontSize: 14.rpx,
                      color: const Color(0xffB9B9BB),
                    ),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
